#include "Renderable.h"

namespace Graphics
{
	int Renderable::m_BaseID = 0;

	Renderable::Renderable(void):m_Visible(true),m_Sequence(0)
	{
		m_ObjID = ++ m_BaseID;
	}

	Renderable::~Renderable(void)
	{
	}

	int Renderable::GetObjID(void)
	{
		return m_ObjID;
	}

	// Render the object to graphic
	bool Renderable::Render(void)
	{
		if(this->GetVisible())
		{
			return this->RenderImpl();
		}
		return false;
	}

	void Renderable::SetSequence(int sequence)
	{
		m_Sequence = sequence;
	}

	void Renderable::SetVisible(bool visible)
	{
		m_Visible = visible;
	}
}